home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
turbotut.arc
/
BIGREC.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-06-30
|
1KB
|
57 lines
PROGRAM a_larger_record;
CONST number_of_friends = 50;
TYPE full_name = RECORD
first_name : STRING[12];
initial : CHAR;
last_name : STRING[15];
END;
date = RECORD
day : BYTE;
month : BYTE;
year : INTEGER;
END;
person = RECORD
name : full_name;
city : STRING[15];
state : STRING[2];
zipcode : STRING[5];
birthday : date;
END;
VAR friend : ARRAY[1..number_of_friends] OF person;
self,mother,father : person;
index : BYTE;
BEGIN (* main program *)
self.name.first_name := 'Charley';
self.name.initial := 'Z';
self.name.last_name := 'Brown';
WITH self DO
BEGIN
city := 'Anywhere';
state := 'CA';
zipcode := '97342';
birthday.day := 17;
WITH birthday DO
BEGIN
month := 7;
year := 1938;
END;
END; (* all data for self now defined *)
mother := self;
father := mother;
FOR index := 1 TO number_of_friends DO
friend[index] := mother;
WRITE(friend[27].name.first_name,' ');
WRITE(friend[33].name.initial,' ');
WRITE(father.name.last_name);
WRITELN;
END. (* of main program *)